﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Demo1
{
    public partial class control : Form
    {
        public control()
        {
            InitializeComponent();
            for (int i = 0; i < Program.game.creatures.Count; i++)
            {
                comboBox1.Items.Add(i.ToString());
            }
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            String s = comboBox1.Text;
            int i = int.Parse(s);
            tbWidth.Value = Program.game.creatures[i].Width;
            tbHeight.Value = Program.game.creatures[i].Height;
            lblWidth.Text = tbWidth.Value.ToString();
            lblHeight.Text = tbHeight.Value.ToString();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void tbWidth_Scroll(object sender, EventArgs e)
        {
            lblWidth.Text = tbWidth.Value.ToString();
        }

        private void tbHeight_Scroll(object sender, EventArgs e)
        {
            lblHeight.Text = tbHeight.Value.ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            String s = comboBox1.Text;
            int i = int.Parse(s);
            Program.game.creatures[i].InitBrain(tbWidth.Value, tbHeight.Value);
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            Program.game.lowProcessMode = checkBox1.Checked;
        }
    }
}
